refactor: native macOS inspector with dense layout and inline picker actions#900
Conversation
…inline picker actions
3bc76ef to
1e7ed87
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3bc76ef956
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let isNullValue = context.originalValue == nil && !isPendingDefault | ||
| let displayValue: String = { | ||
| if isPendingNull || isNullValue { return Self.nullSentinel } | ||
| if isPendingDefault { return Self.defaultSentinel } | ||
| return normalizeBooleanValue(context.value.wrappedValue) |
There was a problem hiding this comment.
Base NULL selection on effective value, not original value
When a boolean/enum field starts as NULL, selecting a concrete value does not update the picker display because isNullValue is computed from context.originalValue. originalValue stays nil until a refresh, so the binding getter keeps returning the NULL sentinel even after context.value has been changed, making the control appear stuck on NULL (same pattern is present in EnumPickerView). This breaks the expected "pick a value to clear NULL" flow in the inspector.
Useful? React with 👍 / 👎.
| ? String(localized: "No selection") | ||
| : context.value.wrappedValue |
There was a problem hiding this comment.
Show pending NULL/DEFAULT state in SET picker label
The SET picker label is now derived only from context.value.wrappedValue, but setFieldToNull/setFieldToDefault store state in flags while leaving pendingValue as nil. Because picker fields no longer use PendingStateOverlay, choosing "Set NULL" or "Set DEFAULT" can leave the label showing the old value, so users get no visible confirmation that a NULL/DEFAULT edit is pending.
Useful? React with 👍 / 👎.
Summary
List(.sidebar)toList(.inset)with hidden row separators for compact densityinspectorTrackingSeparatorto toolbar for three-zone visual alignment (sidebar | content | inspector).labelsHidden()to prevent Form label duplication in field editorsTest plan